import Vue from 'vue'
import Vuex from 'vuex'
import problems from './modules/problems'
import practice from './modules/practice'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    problems,
    practice
  },
  state: {
    webSocket: null
  },
  mutations: {
    setWebSocket(state, ws) {
      state.webSocket = ws
    }
  }
}) 